<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.util.*"%>
<%@page import="imageviewer.beans.DaysBean"%>
<%@page import="imageviewer.domain.Camera"%>
<%@page import="imageviewer.domain.MyDate"%>
<%
	DaysBean bean = (DaysBean) request.getAttribute("DaysBean");
%>
<html>
	<head>
		<%@include file="Head.jsp" %>
	</head>
<body>
	<%@include file="Top.jsp" %>
	<div id="content">
	<p id="emsg"></p>
	<form action="/ImageViewer/servlet/Image" method="post">
		<hr>
		<table>
			<tr>
				<%for(int i = 0; i<bean.getCameras().size();i++){ 
					Camera cam = bean.getCameras().get(i);%>
					<td><input type="checkbox" name="cameras" value="<%=cam.getId() %>"/> <%= cam.getCameraName() %></td>
				<%} %>
			</tr>
		</table>
		<hr>
		<table>
			<tr>
				<td>Alle Bilder vom:</td>
				<td>
					<select name="day" size="1">
						<%for(int i = 0; i<bean.getDays().size();i++){ 
							MyDate date = bean.getDays().get(i);%>
							<option value="<%=date.getDate() %>"><%=date.getFormatedDate() %></option>
						<%} %>	
					</select>
				</td>
				<td>
					<input type="submit" name="action" value="Zeige Tag"/>
				</td>
			</tr>
		</table>
		<hr>
		<table>
			<tr>
				<td>Alle Bilder von:</td>
				<td>Bis:</td>
			</tr>
			<tr>
				<td>
					<select name="dayFrom" size="1">
						<%for(int i = 0; i<bean.getDays().size();i++){
							MyDate date = bean.getDays().get(i);%>
							<option value="<%=date.getDate() %>"><%=date.getFormatedDate() %></option>
						<%} %>	
					</select>
				</td>
				<td>
					<select name="dayTo" size="1">
						<%for(int i = 0; i<bean.getDays().size();i++){ 
							MyDate date = bean.getDays().get(i);%>
							<option value="<%=date.getDate() %>"><%=date.getFormatedDate() %></option>
						<%} %>	
					</select>
				</td>
			</tr>
			<tr>
				<td>Von Uhrzeit:</td>
				<td>Bis Uhrzeit:</td>
			</tr>
			<tr>
				<td><input type="text" name="TimeFrom"/></td>
				<td><input type="text" name="TimeTo"/></td>
			</tr>
			<tr>
				<td colspan="2"><input type="submit" name="action" value="Zeige Von Bis"/></td>
			</tr>
		</table>
	</form>
	</div>
</body>
</html>